<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddRepairStepIdInNoteTable extends AbstractMigration
{

    public function up()
    {
        $this->table('note')
            ->addColumn('repair_step_id', 'integer', ['limit' => 11, 'null' => false, 'signed' => false, 'default' => 0, 'comment' => '返修工序id'])
            ->addColumn('confirm_user_id', 'integer', ['limit' => 11, 'null' => false, 'signed' => false, 'default' => 0, 'comment' => '确认用户id'])
            ->save();
    }

    public function down()
    {
        $this->table('note')
            ->removeColumn('repair_step_id')
            ->removeColumn('confirm_user_id')
            ->save();
    }
}
